﻿using System;
using System.Collections.Generic;
using System.Text;

namespace IOP.OpenType.Tables
{
    /// <summary>
    /// 
    /// </summary>
    public class CmapSubTable0 : CmapSubTable
    {
        /// <summary>
        /// 字形Id数组
        /// </summary>
        public byte[] GlyphIdArray { get; set; } = new byte[256];
        /// <summary>
        /// 
        /// </summary>
        /// <param name="c"></param>
        /// <returns></returns>
        public override uint GetGlyphId(char c)
        {
            byte b = (byte)c;
            return GlyphIdArray[b];
        }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public override char GetMaxCharacter()
        {
            return (char)255;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public override char GetMinCharacter()
        {
            return (char)0;
        }
    }
}
